package com.example.dto;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotNull;
import lombok.Data;

import java.io.Serializable;

@Data
@JsonIgnoreProperties(ignoreUnknown = true) // 标注 忽略未知属性
@Schema(description = "微信小程序登录参数")
public class WebchatLoginDTO implements Serializable {
    private static final long serialVersionUID = 1L;

    @Schema(description =  "code", required = true)
    @NotNull(message = "授权码")
    private String code;

    @Schema(description =  "encryptedData", required = false)
    private String encryptedData;

    @Schema(description =  "iv", required = false)
    private String iv;

    @Schema(description =  "tenantId", required = true) // 场景值：标识store_id
    @NotNull(message = "场景值标识租户id")
    private Long tenantId;

    @Schema(description =  "storeId", required = true) // 场景值：标识store_id
    @NotNull(message = "场景值标识门店id")
    private Long storeId;

}
